package linwen.wang.tdddemo.controller;

import linwen.wang.tdddemo.vo.UserInfo;
import linwen.wang.tdddemo.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @Autowired
    private UserInfoService userInfoService;

    @PostMapping("/getUserInfoById/{id}")
    public UserInfo getUserInfo(@PathVariable("id") Long id) throws Exception {
        return userInfoService.getUserInfo(id);
    }
}
